package com.zhouxiaoge.状态模式;

/**
 * @author 周小哥 gqzmy@163.com 2023/2/27 14:40
 */

public class StatePatternDemo {
    public static void main(String[] args) {
        Context context = new Context();

        StartState startState = new StartState();
        startState.doAction(context);

        System.out.println(context.getState().toString());

        StopState stopState = new StopState();
        stopState.doAction(context);
        System.out.println(context.getState().toString());
    }
}
